
<div class="row">
  <ul class="nav nav-pills">
    <li class="active">
      <a href="#">管理</a>
    </li>
    <li><a href="<?php echo $this->createUrl('create') ?>">添加</a></li>
  </ul>
</div>
<div class="row">
	<?php $form=$this->beginWidget('CActiveForm', 
      array("id"=>'userform',
      'enableClientValidation'=>true,
      'clientOptions'=>array(
        'validateOnSubmit'=>true,
      ),
      "htmlOptions"=>array(
          "class"=>"form-inline")
    )); ?>
  <?php $this->endWidget(); ?>
      <table class="table table-bordered table-hover">
        <thead>
          <tr>
            <th>id</th>
            <th>用户名</th>
            <th>姓名</th>
            <th>email</th>
            <th>最后登录时间</th>
            <th>ip</th>
            <th>操作</th>
          </tr>
        </thead>
        <tbody>
          <?php foreach ($data->getData() as $item) {?>
            <tr>
              <td><?php echo $item->userid ?></td>
              <td><?php echo $item->username ?></td>
              <td><?php echo $item->truename ?></td>
              <td><?php echo $item->email ?></td>
              <td><?php echo $item->lastlogintime ?></td>
              <td><?php echo $item->ip ?></td>
              <td>
                <a href="" title="编辑"><i class="icon-edit"></i></a>&nbsp;&nbsp;
                <?php if(Yii::app()->user->name!=$item->username){ ?>
                <a href="<?php echo $this->createUrl('user/del',array("id"=>$item->userid)) ?>" data-trigger="confirm" data-content='是否确定删除？' title="删除"><i class="icon-remove"></i></a>
                <?php } ?>
              </td>
            </tr>
          <?php } ?>
        </tbody>
      </table>
<?php $this->widget("CBootstrapPager",array('pages'=>$data->getPagination())) ?>
</div>
<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/scojs/js/sco.modal.js" type="text/javascript" charset="utf-8" async defer></script>
<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/scojs/js/sco.confirm.js" type="text/javascript" charset="utf-8" async defer></script>